<template>
    <fieldset>
        <legend>插槽</legend>
        <input type="text"><button>点击</button>
        <div class="header"><slot name="header">
            <!-- 默认展位的内容 -->
            <h1>我占一个位子</h1>
        </slot></div>
        <div class="body"><slot name="main"></slot></div>
        <div class="footer"><slot name="footer"></slot></div>
        <slot :o="obj"></slot>
    </fieldset>
</template>

<script>
    export default {
        data() {
            return {
                obj: {
                    name:"老刘",
                    age:30,
                    nickname:"老六"
                }
            }
        }
    }

</script>